lib/repo: open file only if required
authorLuca BRUNO <luca.bruno@coreos.com>
Mon, 24 Jan 2022 16:46:40 +0000 (16:46 +0000)
committerLuca BRUNO <luca.bruno@coreos.com>
Mon, 24 Jan 2022 16:54:54 +0000 (16:54 +0000)
commitb27792ade385130e9d0c2924c51107b5f263cb57
tree77203bc025d93edc3be9d2c9e382460714a54ebc
parent0713ad32599441b5861dac05a8413e0d25454b8a
lib/repo: open file only if required

This tightens up the logic for opening a file while inspecting its
xattrs. The only codepath fetching xattrs from a FD is the one
handling 'bare' mode.
It also rearranges the else-assert flow, mostly for future-proofing.
src/libostree/ostree-repo.c